package com.flyan.game.motafx.entity.character;

import com.flyan.game.motafx.core.enums.EntityClassifyEnum;
import com.flyan.game.motafx.core.enums.EntityTypeEnum;
import com.flyan.game.motafx.core.pojo.LifePanel;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static com.flyan.game.motafx.core.enums.EntityTypeEnum.CHARACTER_BRAVE;

/**
 * 角色表
 *
 * @author flyan
 * @version 1.0
 * @email flyan_by_chenu@sina.com
 * @since 2025/2/10
 */
public class CharacterTable {

    private final Map<EntityTypeEnum, CharacterInfo> table;

    public CharacterTable() {
        List<EntityTypeEnum> monsterTypes = EntityTypeEnum.getByClassify(EntityClassifyEnum.CHARACTER);
        this.table = new HashMap<>(monsterTypes.size());
        table.put(CHARACTER_BRAVE, new CharacterInfo() {{
            setType(CHARACTER_BRAVE);
            setName(CHARACTER_BRAVE.getName());
            setLifePanel(new LifePanel(35, 18, 1, 1));
        }});
    }

    public CharacterInfo get(EntityTypeEnum characterType) {
        return table.get(characterType);
    }

}
